Rewrite ec-slimloader to use persistent state journal and ROM authentication#19
Conversation
|
@Wassasin This repo's policy is a bit out of dated. I created this PR: #20 to remove per commit checking and update repo policy to allow squashing. This should make dealing with CI a lot easier. Please rebase on top. @JamesHuard Please review #20 |
e501c7c to
335c184
Compare
78d7026 to
07bcae4
Compare
…nup defmt logging
0f74d68 to
97f11fd
Compare
There was a problem hiding this comment.
Pull Request Overview
This pull request completely rewrites the ec-slimloader project to use a persistent state journal system and ROM authentication instead of the previous descriptor-based approach. The PR transitions from a fixed memory address descriptor system to hardcoded slot layouts, employs the NXP MBI container format for image encoding, and introduces a comprehensive bootloader toolchain.
- Replaces descriptor-based bootloader with state journal and ROM authentication
- Introduces new library structure with separate concerns for state management, ROM APIs, and iMXRT support
- Adds a complete bootloader toolchain for signing and managing images
Reviewed Changes
Copilot reviewed 84 out of 86 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| src/main.rs | Completely removed old bootloader entry point |
| libs/ec-slimloader/src/lib.rs | New async bootloader framework with Board trait |
| libs/ec-slimloader-state/src/state.rs | State management with CRC-protected boot status |
| libs/ec-slimloader-imxrt/src/lib.rs | iMXRT-specific Board implementation with authentication |
| bootloader-tool/src/main.rs | New CLI toolchain for image signing and management |
| examples/rt685s/ | Complete example implementation for RT685S EVK |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
There was a problem hiding this comment.
bootloader-tool is still missing CI coverage and README needs to be updated. But the core library looks good. Let's merge it in for now to unblock our partners and create issues to follow up.
bootloader-tool is marked as experimental and README is marked as outdated.
Processing feedback from PR #19: - [x] Fixed issue with `log` feature not compiling for /libs (added to CI as well) - [x] Renamed anonymous `N` const parameter to `BLOCK_SIZE` and explained what it is for. - [x] Reverted hard-copy `device-driver` generated manifest and fixed building in CI. - [x] Fix clippy warnings and formatting for `bootloader-tool`. - [x] Added `bootloader-tool` to CI, with exception of `cargo deny`. - [x] Moved away from `serde_yaml` and use `serde_json` instead for `bootloader-tool`. (we are only serializing, and yaml is a superset of json) --------- Co-authored-by: Jerry Xie <139205137+jerrysxie@users.noreply.github.com>
With #19 the README's became vastly outdated. This short PR brings them up to parity at least. Co-authored-by: Jerry Xie <139205137+jerrysxie@users.noreply.github.com>
This PR pulls in ec-slimloader-descriptors and a bootloader-tool. The concept of descriptors on a fixed memory address has been dropped in favor of hardcoded slot layouts. We employ the NXP MBI container format to encode image length and destination address.
Several TODOs remain: